<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<div id="app">
		<div>{{pmsg}}</div>
		<menu-item title="来自父组件的值"></menu-item>
		<menu-item :title="ptitle" content="hello"></menu-item>
	</div>
	<script type="text/javascript" src="js/vue.js"></script>
	<script type="text/javascript">
		/*
			父组件向子组件传递值
		*/
		Vue.component('menu-item', {
			props: ['title', 'content'],
			data: function() {
				return {
					smsg: '子组件本身的数据'
				}
			},
			template: '<div>{{smsg + "----" + title + "----" + content}}</div>'
		})
		var vm = new Vue({
			el: '#app',
			data: {
				pmsg: '父组件中的内容',
				ptitle: '动态绑定属性'
			},
			
		})
	</script>
</body>
</html>